import React, { Component } from 'react'

export class AddCount extends Component {
 constructor(props){
    super(props);
 }
 changeAdd(count){
    this.props.addCountFn(count);
 }
  render() {
    return (
      <div>
          <button onClick={()=>this.changeAdd(-1)}>+1</button>
          <button onClick={()=>this.changeAdd(-5)}>+5</button>
          <button onClick={()=>this.changeAdd(-10)}>+10</button>
      </div>
    )
  }
}

export default AddCount